<?php
session_start();
    
if(!isset($_COOKIE['pwd']) || empty($_COOKIE['pwd']))
    {
        header("Location: index.php"); 
        exit;
    }
    
    /*if(!isset($_SESSION['pwd']) || empty($_SESSION['pwd']))
    {
        header("Location: index.php"); 
        exit;
    }

    echo $_SESSION['pwd'].'<br>';
echo $_COOKIE['pwd'];

if(isset($_COOKIE['pwd']))
{
	echo '1';
}else{
	echo '2';
}

print_r($_COOKIE);
print_r($_SESSION);*/
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>IPAD SIGN HOME</title>
  <style>
  body{
   margin:0px;
   font-family:Arial;
   font-size:13px;
   
   background:#d9d6cd;
  }
  img{
   border:0px;
  }
  .header{
    height:80px;
    background:#330000;
  }
  .baise{
   color:#ffffff;
  }
  .fr{
    float:right;
  }
  .fl{
    float:left;
  }
  .bck{
    margin-top:-7px;
    margin-left:20px;
  }
  .mr50{
    margin-right:-2px;
  }
  </style>
  <script type="text/javascript" src="../jquery-1.7.1.min.js"></script>
  <script type="text/javascript">
    function chagenav(obj)
    {
        if(obj == 'home')
        {
        	$('#home')[0].src = "images/home/nav-home-1.png";

        	$('#password')[0].src = "images/home/nav-password-2.png";

        	$('#logout')[0].src = "images/home/nav-logout-2.png";
        }

        if(obj == 'password')
        {
        	$('#home')[0].src = "images/home/nav-home-2.png";

        	$('#password')[0].src = "images/home/nav-password-1.png";

        	$('#logout')[0].src = "images/home/nav-logout-2.png";
        }

        if(obj == 'logout')
        {
        	$('#home')[0].src = "images/home/nav-home-2.png";

        	$('#password')[0].src = "images/home/nav-password-2.png";

        	$('#logout')[0].src = "images/home/nav-logout-1.png";
        }
    	 
    }

   function logout_l()
   {
//	   console.log('1');
       $.ajax({
 			type:'POST',
			url:'server.php',
			data:'action=logout',
			dataType: "json",
			beforeSend:function(){
              //$("#keybord").append("<img src='../images/common/loading.gif'>");
             
		    },
			success:function(data){
                  //if(data == 1)
                 // {
                      window.location.href = 'index.php'
                 // }
				}	
         

     });	   
   } 
    
  </script>
 </head>

 <body >
 <div class="header baise" >
 <table width="100%">
   <tr>
      <td> <div class='fl bck'><img id="iback" src="images/home/nav-back-2.png"></div></td>
      <td>
        <div class='fr mr50'  style="margin-right:15px;"><img id='logout1'   src="images/home/nav-line.png"  alt='1'></div>
        <div class='fr mr50' style="margin-top:-3px;"><a href="index.php?act=out" ><img id='logout' onclick="chagenav('logout');" src="images/home/nav-logout-2.png"  alt='1'></a></div>
        <div class='fr mr50'><img id='logout1'   src="images/home/nav-line.png"  alt='1'></div>
        <div class='fr' style="margin-top:-3px;"><a href="password.php" target='frame1'><img id='password' onclick="chagenav('password');" src="images/home/nav-password-2.png"  alt='1'></a></div>
        <div class='fr mr50'><img id='logout11'  src="images/home/nav-line.png"  alt='1'></div>
        <div class='fr' style="margin-top:-3px;"><a href="query_no.php" target='frame1'><img id='home' onclick="chagenav('home');" src="images/home/nav-home-1.png" alt='2'></a></div>
        <div class='fr mr50'><img id='logout1'   src="images/home/nav-line.png"  alt='1'></div>
      </td>
   </tr>
 </table>
 </div>
 <div  style="position:relative; overflow:hidden"  height="100%">
 <iframe src="query_no.php" id="frame1"  scrolling="auto" style="border:none; margin-bottom:30px" width="100%"  height="85%"></iframe>
  </div>
 </body>
</html>